.settings-page {
  min-height: 100vh;
  background: #ffffff;
  padding: 24px;
  padding-bottom: 120px; /* 增加底部内边距，确保所有内容可见 */
  width: 100%;
  box-sizing: border-box;
  overflow-y: auto; /* 允许垂直滚动 */
}

.settings-container {
  max-width: 800px;
  margin: 0 auto;
}

.settings-header {
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--border-light);
}

.header-content {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.back-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s ease;
}

.back-button:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  transform: translateX(-2px);
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.settings-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.settings-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 32px;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 var(--space-6) 0;
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-light);
}

.section-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  transition: all 0.2s ease;
}

.setting-item:hover {
  background: var(--bg-tertiary);
}

.setting-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  flex: 1;
}

.setting-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
}

.setting-desc {
  font-size: 14px;
  color: var(--text-secondary);
}

.setting-control {
  margin-left: var(--space-4);
}

.toggle-switch {
  position: relative;
  width: 48px;
  height: 28px;
  background: var(--border-medium);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.toggle-switch.active {
  background: var(--button-primary-bg, var(--primary-600));
}

.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  background: var(--text-inverse);
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.toggle-switch.active .toggle-thumb {
  transform: translateX(20px);
}

.settings-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-4);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-light);
}

/* 按钮样式 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--button-primary-bg, var(--primary-600));
  color: var(--text-inverse);
  border-color: var(--button-primary-bg, var(--primary-600));
}

.btn-primary:hover:not(:disabled) {
  background: var(--button-primary-hover, var(--primary-700));
  border-color: var(--button-primary-hover, var(--primary-700));
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--gray-50);
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .settings-page {
    padding: var(--space-4);
  }
  
  .settings-section {
    padding: var(--space-4);
  }
  
  .page-title {
    font-size: 24px;
  }
  
  .settings-actions {
    flex-direction: column;
  }
  
  .settings-actions .btn {
    width: 100%;
  }
}

/* 深色模式调整 */
@media (prefers-color-scheme: dark) {
  .setting-item {
    background: var(--bg-tertiary);
  }
  
  .setting-item:hover {
    background: var(--border-light);
  }
}
